package com.itlong.cloud.user.property;

import com.itlong.cloud.POJO.DTO.property.AppUserUpdateUserRoomStatusDTO;
import com.itlong.cloud.POJO.DTO.property.UserDeviceAuthAddreddDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      住户设备权限接口服务暴露接口
 * </desc>
 *
 * @createDate 2017/10/18
 */
@FeignClient(name = "user-service")
public interface IPropertyHouseHoldDeviceAuthServiceClient {

    /**
     * <desc>
     *      用户设备权限-获取用户权限地址
     * <desc/>
     *
     * @param userIdLists 权限变更的用户Id和对应项目Id的集合
     * @param projectId 项目Id
     * @param loginUserId 用户登录Id
     * @return List<UserDeviceAuthAddreddDTO> 用户权限地址数据传输对象集
     * @author zhangs
     * @createDate 2017/10/13
     */
    @RequestMapping(path = "manage/getUserAuthAddr", method = RequestMethod.POST)
    List<UserDeviceAuthAddreddDTO> getUserAuthAddr(
            @RequestBody List<Map<String, Object>> userIdLists,
            @RequestParam("projectId") String projectId,
            @RequestParam("loginUserId") String loginUserId);

    /**
     * <desc>
     *      迁出住户时删除地址对应的其他类别的设备权限
     * <desc/>
     *
     * @param  appUserUpdateUserRoomStatusDTO 迁出App用户传输数据
     * @param  projectId 项目Id
     * @return
     * @author zhangs
     * @createDate 2017/11/2
     */
    @RequestMapping(path = "manage/delUserOtherAuth", method = RequestMethod.POST)
    void delUserOtherAuth(@RequestBody AppUserUpdateUserRoomStatusDTO appUserUpdateUserRoomStatusDTO, @RequestParam("projectId") String projectId);
}
